Closed Bug 1805820 Opened 2 years ago Closed 2 years ago

Permanent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/mozglue/misc/ConditionVariable_posix.cpp:88:11 in mozilla::detail::ConditionVariableImpl::~ConditionVariableImpl()

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: nika)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

I've been looking at enabling GTests in TSAN mode and this is currently permafailing. I assume that the TestStackWalk.StackWalk failures are also related. Any thoughts on this, glandium?

Blocks: tsan
Severity: S4 → --
Flags: needinfo?(mh+mozilla)
Priority: P5 → --
Summary: Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/mozglue/misc/ConditionVariable_posix.cpp:88:11 in mozilla::detail::ConditionVariableImpl::~ConditionVariableImpl() → Permanent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/mozglue/misc/ConditionVariable_posix.cpp:88:11 in mozilla::detail::ConditionVariableImpl::~ConditionVariableImpl()

Copy/pasting the log before it expires:

[task 2022-12-15T03:02:00.014Z] 03:02:00     INFO -  WARNING: ThreadSanitizer: data race (pid=1529)
[task 2022-12-15T03:02:00.015Z] 03:02:00     INFO -    Write of size 8 at 0x7ffd1f3b7550 by main thread:
[task 2022-12-15T03:02:00.015Z] 03:02:00     INFO -      #0 pthread_cond_destroy /builds/worker/fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1304:3 (firefox-bin+0xb525c) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.015Z] 03:02:00     INFO -      #1 mozilla::detail::ConditionVariableImpl::~ConditionVariableImpl() /builds/worker/checkouts/gecko/mozglue/misc/ConditionVariable_posix.cpp:88:11 (firefox-bin+0x19f755) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.016Z] 03:02:00     INFO -      #2 ~OffTheBooksCondVar /builds/worker/workspace/obj-build/dist/include/mozilla/CondVar.h:47:33 (libxul.so+0x48b866c) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.016Z] 03:02:00     INFO -      #3 ~Monitor /builds/worker/workspace/obj-build/dist/include/mozilla/Monitor.h:29:22 (libxul.so+0x48b866c)
[task 2022-12-15T03:02:00.016Z] 03:02:00     INFO -      #4 DelayedRunnable_TimerFiresBeforeRunnableRuns_Test::TestBody() /builds/worker/checkouts/gecko/xpcom/tests/gtest/TestDelayedRunnable.cpp:158:1 (libxul.so+0x48b866c)
[task 2022-12-15T03:02:00.017Z] 03:02:00     INFO -      #5 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x51baa52) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.017Z] 03:02:00     INFO -      #6 testing::Test::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2674:5 (libxul.so+0x51ba8bc) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.018Z] 03:02:00     INFO -      #7 testing::TestInfo::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2853:11 (libxul.so+0x51bc2ec) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.018Z] 03:02:00     INFO -      #8 testing::TestSuite::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3012:30 (libxul.so+0x51bd8d4) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.018Z] 03:02:00     INFO -      #9 testing::internal::UnitTestImpl::RunAllTests() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5870:44 (libxul.so+0x51ddce9) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.018Z] 03:02:00     INFO -      #10 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x51dd472) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.018Z] 03:02:00     INFO -      #11 testing::UnitTest::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5444:10 (libxul.so+0x51dd20e) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.019Z] 03:02:00     INFO -      #12 RUN_ALL_TESTS /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h:2295:73 (libxul.so+0x517dfa1) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.019Z] 03:02:00     INFO -      #13 mozilla::RunGTestFunc(int*, char**) /builds/worker/checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x517dfa1)
[task 2022-12-15T03:02:00.019Z] 03:02:00     INFO -      #14 XREMain::XRE_mainStartup(bool*) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4809:16 (libxul.so+0xde92e06) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #15 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5961:12 (libxul.so+0xde9ac50) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #16 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6029:21 (libxul.so+0xde9b3cc) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #17 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xdea89d2) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #18 do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:226:22 (firefox-bin+0x134a49) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #19 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:430:16 (firefox-bin+0x134a49)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -    Previous read of size 8 at 0x7ffd1f3b7550 by thread T350 (mutexes: write M0):
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #0 pthread_cond_broadcast /builds/worker/fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1297:3 (firefox-bin+0xb5107) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #1 mozilla::detail::ConditionVariableImpl::notify_all() /builds/worker/checkouts/gecko/mozglue/misc/ConditionVariable_posix.cpp:98:11 (firefox-bin+0x19f815) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #2 NotifyAll /builds/worker/workspace/obj-build/dist/include/mozilla/CondVar.h:83:28 (libxul.so+0x48cb208) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #3 NotifyAll /builds/worker/workspace/obj-build/dist/include/mozilla/Monitor.h:43:31 (libxul.so+0x48cb208)
[task 2022-12-15T03:02:00.020Z] 03:02:00     INFO -      #4 operator() /builds/worker/checkouts/gecko/xpcom/tests/gtest/TestDelayedRunnable.cpp:133:3 (libxul.so+0x48cb208)
[task 2022-12-15T03:02:00.022Z] 03:02:00     INFO -      #5 mozilla::detail::RunnableFunction<DelayedRunnable_TimerFiresBeforeRunnableRuns_Test::TestBody()::$_10>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:546:5 (libxul.so+0x48cb208)
[task 2022-12-15T03:02:00.023Z] 03:02:00     INFO -      #6 mozilla::TaskQueue::Runner::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskQueue.cpp:259:20 (libxul.so+0x667f1a2) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.023Z] 03:02:00     INFO -      #7 nsThreadPool::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:309:14 (libxul.so+0x669bd74) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.023Z] 03:02:00     INFO -      #8 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1198:16 (libxul.so+0x6692b0b) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.023Z] 03:02:00     INFO -      #9 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:474:10 (libxul.so+0x66995b6) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.023Z] 03:02:00     INFO -      #10 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x735a83e) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.027Z] 03:02:00     INFO -      #11 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:381:10 (libxul.so+0x7276be7) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.027Z] 03:02:00     INFO -      #12 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:374:3 (libxul.so+0x7276be7)
[task 2022-12-15T03:02:00.027Z] 03:02:00     INFO -      #13 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:356:3 (libxul.so+0x7276be7)
[task 2022-12-15T03:02:00.027Z] 03:02:00     INFO -      #14 nsThread::ThreadFunc(void*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:383:10 (libxul.so+0x668dcf2) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.027Z] 03:02:00     INFO -      #15 _pt_root /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x523e3) (BuildId: 59c597fb5e2a6441b89c5683c3f3a0da1a96bcec)
[task 2022-12-15T03:02:00.027Z] 03:02:00     INFO -    Location is stack of main thread.
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -    Location is global '??' at 0x7ffd1f39b000 ([stack]+0x1c550)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -    Mutex M0 (0x7fab7eeffeb0) created at:
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #0 pthread_mutex_init /builds/worker/fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1316:3 (firefox-bin+0xb53af) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #1 mozilla::detail::MutexImpl::MutexImpl() /builds/worker/checkouts/gecko/mozglue/misc/Mutex_posix.cpp:78:3 (firefox-bin+0x1a0292) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #2 OffTheBooksMutex /builds/worker/workspace/obj-build/dist/include/mozilla/Mutex.h:46:12 (libxul.so+0x48caf89) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #3 Mutex /builds/worker/workspace/obj-build/dist/include/mozilla/Mutex.h:125:39 (libxul.so+0x48caf89)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #4 Monitor /builds/worker/workspace/obj-build/dist/include/mozilla/Monitor.h:27:9 (libxul.so+0x48caf89)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #5 operator() /builds/worker/checkouts/gecko/xpcom/tests/gtest/TestDelayedRunnable.cpp:133:3 (libxul.so+0x48caf89)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #6 mozilla::detail::RunnableFunction<DelayedRunnable_TimerFiresBeforeRunnableRuns_Test::TestBody()::$_10>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:546:5 (libxul.so+0x48caf89)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #7 mozilla::TaskQueue::Runner::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskQueue.cpp:259:20 (libxul.so+0x667f1a2) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #8 nsThreadPool::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:309:14 (libxul.so+0x669bd74) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #9 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1198:16 (libxul.so+0x6692b0b) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #10 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:474:10 (libxul.so+0x66995b6) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #11 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x735a83e) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.028Z] 03:02:00     INFO -      #12 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:381:10 (libxul.so+0x7276be7) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.029Z] 03:02:00     INFO -      #13 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:374:3 (libxul.so+0x7276be7)
[task 2022-12-15T03:02:00.029Z] 03:02:00     INFO -      #14 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:356:3 (libxul.so+0x7276be7)
[task 2022-12-15T03:02:00.029Z] 03:02:00     INFO -      #15 nsThread::ThreadFunc(void*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:383:10 (libxul.so+0x668dcf2) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.030Z] 03:02:00     INFO -      #16 _pt_root /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x523e3) (BuildId: 59c597fb5e2a6441b89c5683c3f3a0da1a96bcec)
[task 2022-12-15T03:02:00.030Z] 03:02:00     INFO -    Thread T350 'Test Pool #1' (tid=1894, running) created by main thread at:
[task 2022-12-15T03:02:00.030Z] 03:02:00     INFO -      #0 pthread_create /builds/worker/fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3 (firefox-bin+0xb3bdd) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.031Z] 03:02:00     INFO -      #1 _PR_CreateThread /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x4948f) (BuildId: 59c597fb5e2a6441b89c5683c3f3a0da1a96bcec)
[task 2022-12-15T03:02:00.031Z] 03:02:00     INFO -      #2 PR_CreateThread /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x3e2a5) (BuildId: 59c597fb5e2a6441b89c5683c3f3a0da1a96bcec)
[task 2022-12-15T03:02:00.032Z] 03:02:00     INFO -      #3 nsThread::Init(nsTSubstring<char> const&) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:617:18 (libxul.so+0x668f8a7) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.032Z] 03:02:00     INFO -      #4 nsThreadManager::NewNamedThread(nsTSubstring<char> const&, unsigned int, nsIThread**) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadManager.cpp:539:12 (libxul.so+0x66983ee) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.032Z] 03:02:00     INFO -      #5 NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:170:57 (libxul.so+0x66a10f5) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.033Z] 03:02:00     INFO -      #6 NS_NewNamedThread /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:162:10 (libxul.so+0x669b2ae) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.033Z] 03:02:00     INFO -      #7 nsThreadPool::PutEvent(already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:122:17 (libxul.so+0x669b2ae)
[task 2022-12-15T03:02:00.034Z] 03:02:00     INFO -      #8 nsThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:361:5 (libxul.so+0x669c84a) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.034Z] 03:02:00     INFO -      #9 non-virtual thunk to nsThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp (libxul.so+0x669cfd8) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.034Z] 03:02:00     INFO -      #10 mozilla::SharedThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/workspace/obj-build/dist/include/mozilla/SharedThreadPool.h:73:28 (libxul.so+0x6675d00) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.035Z] 03:02:00     INFO -      #11 mozilla::TaskQueue::DispatchLocked(nsCOMPtr<nsIRunnable>&, unsigned int, mozilla::AbstractThread::DispatchReason) /builds/worker/checkouts/gecko/xpcom/threads/TaskQueue.cpp:122:26 (libxul.so+0x667dcb7) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.035Z] 03:02:00     INFO -      #12 Dispatch /builds/worker/workspace/obj-build/dist/include/mozilla/TaskQueue.h:88:14 (libxul.so+0x48b8604) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.036Z] 03:02:00     INFO -      #13 DelayedRunnable_TimerFiresBeforeRunnableRuns_Test::TestBody() /builds/worker/checkouts/gecko/xpcom/tests/gtest/TestDelayedRunnable.cpp:133:3 (libxul.so+0x48b8604)
[task 2022-12-15T03:02:00.036Z] 03:02:00     INFO -      #14 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x51baa52) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.037Z] 03:02:00     INFO -      #15 testing::Test::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2674:5 (libxul.so+0x51ba8bc) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.037Z] 03:02:00     INFO -      #16 testing::TestInfo::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2853:11 (libxul.so+0x51bc2ec) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.037Z] 03:02:00     INFO -      #17 testing::TestSuite::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3012:30 (libxul.so+0x51bd8d4) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.038Z] 03:02:00     INFO -      #18 testing::internal::UnitTestImpl::RunAllTests() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5870:44 (libxul.so+0x51ddce9) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.038Z] 03:02:00     INFO -      #19 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x51dd472) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.039Z] 03:02:00     INFO -      #20 testing::UnitTest::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5444:10 (libxul.so+0x51dd20e) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.039Z] 03:02:00     INFO -      #21 RUN_ALL_TESTS /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h:2295:73 (libxul.so+0x517dfa1) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.040Z] 03:02:00     INFO -      #22 mozilla::RunGTestFunc(int*, char**) /builds/worker/checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x517dfa1)
[task 2022-12-15T03:02:00.040Z] 03:02:00     INFO -      #23 XREMain::XRE_mainStartup(bool*) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4809:16 (libxul.so+0xde92e06) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.040Z] 03:02:00     INFO -      #24 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5961:12 (libxul.so+0xde9ac50) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.041Z] 03:02:00     INFO -      #25 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6029:21 (libxul.so+0xde9b3cc) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.041Z] 03:02:00     INFO -      #26 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xdea89d2) (BuildId: eb5c942f790842e6bff3258f93575742e2f01242)
[task 2022-12-15T03:02:00.041Z] 03:02:00     INFO -      #27 do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:226:22 (firefox-bin+0x134a49) (BuildId: 5a3ef181771f4030ae72f5f0427f0567c927b7a0)
[task 2022-12-15T03:02:00.042Z] 03:02:00     INFO -      #28 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:430:16 (firefox-bin+0x134a49)
[task 2022-12-15T03:02:00.042Z] 03:02:00     INFO -  SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/mozglue/misc/ConditionVariable_posix.cpp:88:11 in mozilla::detail::ConditionVariableImpl::~ConditionVariableImpl()

Seems like it would be a problem with the mozilla::Monitor destructor.

Component: mozglue → XPCOM
Flags: needinfo?(mh+mozilla)

I think the issue here might be that we are notifying the outer monitor here: https://searchfox.org/mozilla-central/rev/31f5847a4494b3646edabbdd7ea39cb88509afe2/xpcom/tests/gtest/TestDelayedRunnable.cpp#154, without holding it from that thread, and then immediately after notifying destroying it on another thread, meaning that it's racy. If we acquire OuterMonitor around that NotifyAll call, we should be OK I think. This is done for the inner monitor here: https://searchfox.org/mozilla-central/rev/31f5847a4494b3646edabbdd7ea39cb88509afe2/xpcom/tests/gtest/TestDelayedRunnable.cpp#146-147

Perhaps the code should be changed to use a SyncRunnable or similar instead to avoid this sort of issue, or the monitor locking could just be added.

Assignee: nobody → nika
Status: NEW → ASSIGNED
Severity: -- → S3
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7b616406cf33 Hold the outer lock when notifying outerMonitor in TimerFiresBeforeRunnableRuns test, r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: